//
//  TRTCAudioTab.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/3/13.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class TRTCAudioTab: NSView {
    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        self.addSubview(enableBtn)
        enableBtn.snp.makeConstraints { (make) in
            make.height.equalTo(20)
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(10)
        }
        
        self.addSubview(lineView)
        lineView.snp.makeConstraints { (make) in
            make.height.equalTo(0.6)
            make.centerX.width.top.equalToSuperview()
        }
        
    }
    
    lazy var lineView: NSView = {
        let view = NSView()
        view.wantsLayer = true
        view.layer?.backgroundColor = color_gray(240).cgColor
        return view
    }()
    
    lazy var enableBtn: NSButton = {
        let btn = NSButton()
        btn.title = "加入会议时自动启用本地音频设备"
        btn.sizeToFit()
        btn.setButtonType(NSButton.ButtonType.switch)
        btn.font = NSFont.systemFont(ofSize: 13)
        return btn
    }()
    
    
}
